package com.example.shangjiba;

import java.io.Serializable;

/**
 * 书籍数据模型
 */
public class Book implements Serializable {
    private int id;
    private String bookNo;      // 书号
    private String bookName;    // 书名
    private String userEmail;   // 所属用户邮箱

    public Book() {
    }

    public Book(String bookNo, String bookName, String userEmail) {
        this.bookNo = bookNo;
        this.bookName = bookName;
        this.userEmail = userEmail;
    }

    public Book(int id, String bookNo, String bookName, String userEmail) {
        this.id = id;
        this.bookNo = bookNo;
        this.bookName = bookName;
        this.userEmail = userEmail;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBookNo() {
        return bookNo;
    }

    public void setBookNo(String bookNo) {
        this.bookNo = bookNo;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", bookNo='" + bookNo + '\'' +
                ", bookName='" + bookName + '\'' +
                ", userEmail='" + userEmail + '\'' +
                '}';
    }
}
